using AndyPike.Experiments.Fluent.Commands;
using NUnit.Framework;

namespace AndyPike.Experiments.Fluent.Tests
{
    public class When_processing_an_image : FluentImageTestBase
    {
        [Test]
        public void Should_be_able_to_adjust_the_brightness()
        {
            image
                .Brightness(50)
                .SaveAsJpeg(@"..\..\Test-Output\Brightness.jpg", 80);
        }

        [Test]
        public void Should_be_able_to_adjust_the_contrast()
        {
            image
                .Contrast(50)
                .SaveAsJpeg(@"..\..\Test-Output\Contrast.jpg", 80);
        }

        [Test]
        public void Should_be_able_to_greyscale()
        {
            image
                .Greyscale()
                .SaveAsJpeg(@"..\..\Test-Output\Greyscale.jpg", 80);
        }

        [Test]
        public void Should_be_able_to_build_up_a_pipeline_of_commands()
        {
            image
                .Contrast(30)
                .Brightness(-50)
                .Greyscale()
                .SaveAsJpeg(@"..\..\Test-Output\Full.jpg", 80);
        }

        [Test]
        public void Should_be_able_to_resize()
        {
            image
                .Resize(100, 100, ResizeMode.FixedWidth)
                .SaveAsJpeg(@"..\..\Test-Output\Resize.jpg", 80);
        }
    }
}